The present invention relates to a semiconductor device and is employed suitably for a semiconductor device provided with a TCAM (Ternary Content Addressable Memory) device for example.
A memory device called an associative memory or a CAM (Content Addressable Memory) searches a data word matching a search word out of stored data words and when a matching data word is found, the memory device outputs the address of the matched data word.
There are a BCAM (Binary CAM) and a TCAM (Ternary CAM) in the CAM. Each memory cell of the BCAM stores information of either “0” or “1.” On the other hand, each memory cell of the TCAM can store information of a “don't care” in addition to “0” and “1.” A “don't care” can take any value of “0” and “1.”
The TCAM device is broadly used in a router for networks, such as the Internet, for the purpose of the address search and the access control. In order to respond to the increase in capacity, the TCAM device usually has a configuration in which multiple sub-arrays are provided and search operations for each of the sub-arrays are performed concurrently. For example, according to Non-patent Document 1, sub-arrays called building blocks are arranged with eight pieces in the word-line direction and four pieces in the bit-line direction.
The TCAM device can compare input search data (input packet) with TCAM cell data all at once; accordingly, it operates at higher speed than an RAM (Random Access Memory) in all the search applications. However, a search current is generated at the time of search, bringing up an issue of increase in the electric power consumption.
Japanese Unexamined Patent Application Publication No. 2003-272386 (Patent Literature 1) discloses a TCAM device of a configuration in which multiple sub-arrays arranged in the match-line direction are linked under a pipeline system, for the purpose of the low power consumption. In the TCAM device disclosed by the present literature, a search in the following stage is performed only for the entries matched in the previous stage.